package net.avh4.scratch.rpg;

import java.io.IOException;

public abstract class WorldMap {
	
	protected final TerrainType grass;
	protected final TerrainType water;
	protected final TerrainType desert;
	protected final TerrainType land;
	protected final TerrainType mountain;
	protected final TerrainType blank;
	
	public WorldMap() throws IOException {
		grass = new TerrainType("images/grass.png");
		water = new TerrainType("images/water.png");
		desert = new TerrainType("images/desert.png");
		land = new TerrainType("images/land.png");
		mountain = new TerrainType("images/mountain.png");
		blank = new TerrainType("images/blank.png");
	}
	
	/**
	 * @param x The x-coordinate of the space on the grid.
	 * @param y The y-coordinate of the space on the grid.
	 * @return The TerrainType at the given space on the map grid.
	 */
	public abstract TerrainType getTerrain(int x, int y);

}
